package com.lemonsun.pojo;


import java.sql.Timestamp;
/*
*贴吧表
 */
public class Topic {
    //帖子编号
      private Integer id;
      //标题
      private String title;
      //内容
      private String content;
      //作者
      private String author;
      //发帖时间
      private Timestamp create_time;
      //点击量
      private int click_amount;

      //评论
    private Reply reply;


    public Topic() {
    }

    public Topic(String title, String author,  Timestamp cretime, int amount) {
        this.title = title;
        this.author = author;
        this.create_time = cretime;
        this.click_amount = amount;
    }

    public Topic(Integer id, String title, String content, String author,  Timestamp cretime, int amount) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.author = author;
        this.create_time = cretime;
        this.click_amount = amount;
    }

    public Topic(Integer id, String title, String content, String author, Timestamp cretime, int amount, Reply reply) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.author = author;
        this.create_time = cretime;
        this.click_amount = amount;
        this.reply = reply;
    }

    public Reply getReply() {
        return reply;
    }

    public void setReply(Reply reply) {
        this.reply = reply;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public  Timestamp getCretime() {
        return create_time;
    }

    public void setCretime( Timestamp cretime) {
        this.create_time = cretime;
    }

    public int getAmount() {
        return click_amount;
    }

    public void setAmount(int amount) {
        this.click_amount = amount;
    }

    @Override
    public String toString() {
        return "Topic{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", author='" + author + '\'' +
                ", cretime=" + create_time +
                ", amount=" + click_amount +
                '}';
    }


}
